package com.ss.demo.springbootdemo.web.controller;

import com.ss.demo.springbootdemo.ioc.annotation.MyAutowired;
import com.ss.demo.springbootdemo.ioc.annotation.MyComponent;
import com.ss.demo.springbootdemo.ioc.annotation.MyQualifier;
import com.ss.demo.springbootdemo.ioc.annotation.MyValue;
import com.ss.demo.springbootdemo.web.service.OrderService;
import com.ss.demo.springbootdemo.web.service.iml.OrderServiceImpl;

/**
 * 作者: MrZhangJR
 * 时间: 2021/11/11 17:26
 * 描述:
 */
@MyComponent("order")
public class OrderController {
    @MyValue("zjr")
    private String name;
    @MyValue("100.11")
    private Double money;
    @MyValue("3")
    private Integer payStatus;

    @MyAutowired
//    @MyQualifier("orderService")
    private OrderService orderService;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public OrderService getOrderService() {
        return orderService;
    }

    public void setOrderService(OrderService orderService) {
        this.orderService = orderService;
    }

    @Override
    public String toString() {
        return "OrderController{" +
                "name='" + name + '\'' +
                ", money=" + money +
                ", payStatus=" + payStatus +
                ", orderService=" + orderService +
                '}';
    }
}
